home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / libg_261.zip / libg_261 / libg++ / src / Integer.hP < prev    next >
Text File  |  1993-11-03  |  902b  |  31 lines

  1. // Stuff used to implement the Integer class.
  2. // WARNING:  Its internals WILL change!
  3.  
  4. /*
  5.  Sizes of shifts for multiple-precision arithmetic.
  6.  These should not be changed unless Integer representation
  7.  as unsigned shorts is changed in the implementation files.
  8. */
  9.  
  10. #define I_SHIFT         (sizeof(short) * CHAR_BIT)
  11. #define I_RADIX         ((unsigned long)(1L << I_SHIFT))
  12. #define I_MAXNUM        ((unsigned long)((I_RADIX - 1)))
  13. #define I_MINNUM        ((unsigned long)(I_RADIX >> 1))
  14. #define I_POSITIVE      1
  15. #define I_NEGATIVE      0
  16.  
  17. /* All routines assume SHORT_PER_LONG > 1 */
  18. #define SHORT_PER_LONG  ((unsigned)(((sizeof(long) + sizeof(short) - 1) / sizeof(short))))
  19. #define CHAR_PER_LONG   ((unsigned)sizeof(long))
  20.  
  21. /*
  22.   minimum and maximum sizes for an IntRep
  23. */
  24.  
  25. #define MINIntRep_SIZE   16
  26. #define MAXIntRep_SIZE   I_MAXNUM
  27.  
  28. #ifndef MALLOC_MIN_OVERHEAD
  29. #define MALLOC_MIN_OVERHEAD 4
  30. #endif
  31.